<template>
  <component :is="compName" v-bind="$attrs" v-on="$listeners"></component>
</template>

<script lang="ts">

import { Vue, Component, Provide, Watch, Ref, Prop, Inject, Emit } from 'vue-property-decorator'
import DocTable from './doc-table/index.vue'
import DocThumb from './doc-thumb/index.vue'

@Component({
  components: { DocTable, DocThumb }
})
export default class DocList extends Vue {
  @Prop(String) listType!: string

  get compName () {
    return this.listType === 'list' ? DocTable : DocThumb
  }
}
</script>
